package com.base.collection;

import com.base.jdk8.dto.Person;

import java.util.ArrayList;
import java.util.List;

/**
 * list使用
 *
 * @author: May
 * @date 2020/11/24
 */
public class ListDemo {
    private static List<Person> people = new ArrayList<>(10);

    public static void init() {
        people.add(new Person(1,"mike", 1000, "man", "china"));
    }

    public static void main(String[] args) {
        init();
        for (Person person : people) {
            System.out.println("person = " + person);
        }
    }
}
